home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib43 / mntlib / rmdir.c < prev    next >
C/C++ Source or Header  |  1993-07-06  |  364b  |  24 lines

  1. /* rmdir -- remove a directory */
  2. /* written by Eric R. Smith and placed in the public domain */
  3.  
  4. #include <limits.h>
  5. #include <osbind.h>
  6. #include <errno.h>
  7. #include <unistd.h>
  8. #include "lib.h"
  9.  
  10. int rmdir(_path)
  11.     const char *_path;
  12. {
  13.     char path[PATH_MAX];
  14.     int  r;
  15.  
  16.     _unx2dos(_path, path);
  17.     r = Ddelete(path);
  18.     if (r < 0) {
  19.         errno = -r;
  20.         r = -1;
  21.     }
  22.     return r;
  23. }
  24.